/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.seaworldsoft.xinxifabu.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 *
 * @author sam
 */
@Entity
@Table(name="sys_templatefile")
public class TemplateFile {
        @Id
	@TableGenerator(name = "templatefile", table = "sys_generator", pkColumnName = "key_name", pkColumnValue = "TplFile_ID", valueColumnName = "key_value", initialValue = 1, allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "templatefile")
        
        private int fileId;
        
        /**
         * 文件名称
         */
        @Column(length=50)
        private String fileName;
        /*
         * 文件描述
         */
        @Column(length=150)
        private String fileDemo;
        
        /**
         * 文件类型 detail:明细模版 list:列表模版 index:首页模版
         */
        @Column(length=20)
        private String fileType;

        @ManyToOne
        @JoinColumn(name="tpl_id")
        private Template tpl;

    public int getFileId() {
        return fileId;
    }

    public void setFileId(int fileId) {
        this.fileId = fileId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileDemo() {
        return fileDemo;
    }

    public void setFileDemo(String fileDemo) {
        this.fileDemo = fileDemo;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public Template getTpl() {
        return tpl;
    }

    public void setTpl(Template tpl) {
        this.tpl = tpl;
    }
        
                
}
